package com.sc.show.service;

import com.sc.show.entity.Weather;
import com.sc.show.entity.WeatherResponse;
import com.sc.show.feign.WeatherDataFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shuchang
 * @Date 2018/3/19 上午9:57
 */
@Service
public class ReportServiceImpl implements WeatherReportService {

    @Autowired
    private WeatherDataFeign weatherDataFeign;

    @Override
    public Weather getDataByCityId(String cityId) {
        WeatherResponse response = weatherDataFeign.getById(cityId);
        return response.getData();
    }
}
